home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #6 / Amiga Plus CD - 2004 - No. 06.iso / AmiSoft / Util / libs / ExtraLib.lha / Extra / Demos / ShowMsgDemo.ASM < prev    next >
Assembly Source File  |  2004-05-30  |  5KB  |  134 lines

  1. ; ___________________________________________________________________________
  2. ; |*************************************************************************|
  3. ; |*|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|*|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|*|
  4. ; |*| Set TAB to 15 for best readable file layout. |*| HiSoft DevPac 3.04 |*|
  5. ; |*|______________________________________________|*|____________________|*|
  6. ; |*************************************************************************|
  7. ; |*|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|*|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|*|
  8. ; |*|               |*|  $Id: ShowMsgDemo.ASM (07.10.03)                  |*|
  9. ; |*| ###### ###### |*|  RhoSigma Source based on NDK 3.1 Includes 40.15  |*|
  10. ; |*| ##  ## ##   # |*| _________________________________________________ |*|
  11. ; |*| ##  ##  ##    |*|                                                   |*|
  12. ; |*| ######   ##   |*|  Demo to show use of extra/ShowMsg() and Macros   |*|
  13. ; |*| ##      ##    |*|                                                   |*|
  14. ; |*| ##     ##   # |*| ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ |*|
  15. ; |*| ##     ###### |*|  Copyright © 1998-2002 RhoSigma, Roland Heyder    |*|
  16. ; |*|               |*|  All Rights Reserved.                             |*|
  17. ; |*|_______________|*|___________________________________________________|*|
  18. ; |*************************************************************************|
  19. ; ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  20.  
  21. ; ACHTUNG: Die Macros zum Aufruf der OS-Funktionen, welche in dieser Source
  22. ; ¯¯¯¯¯¯¯¯ verwendet werden, entsprechen nicht denen, die in den offiziellen
  23. ;          Includes in den entsprechenden _lib.i Dateien definiert sind.
  24. ;           Vielmehr habe ich hierfür mein eigenes Macro entwickelt. Dieses
  25. ;          Macro ist im Kontext für alle Libraries identisch und entspicht
  26. ;          dem, welches in dem Include »extra_lib.i« für die mitgelieferte
  27. ;          »extra.library« definiert ist !!
  28.  
  29.     OPT    P=68000,NODEBUG,AMIGA
  30.     OPT    O1+,O2+,O3+,O4+,O5+,O6+,O7+,O10+,O11+
  31.     OPT    CHKBIT,CHKIMM,TYPE,USER
  32.     OUTPUT    ShowMsgDemoASM
  33.  
  34.     INCDIR    Include:
  35.     INCLUDE    lvo/exec_lib.i
  36.     INCLUDE    rhosigma/extra_lib.i
  37.     INCLUDE    rhosigma/extradefs.i
  38.  
  39.     jmp    SysStart
  40.  
  41.     dc.b    "$VER: ShowMsgDemoASM 4.215 (07.10.03)",13,10,0
  42.     dc.w    0
  43.  
  44. SysStart    lea    ExtraName(pc),a1        ; extra.library öffnen
  45.     moveq    #4,d0
  46.     DOEXEC    OpenLibrary
  47.     move.l    d0,_ExtraBase
  48.     beq.s    .error             ; Öffnen fehlgeschlagen
  49.  
  50.     lea    AlertTxt1(pc),a0        ; ShowMsg ausführen
  51.     moveq    #0,d0
  52.     moveq    #40,d1
  53.     moveq    #0,d2
  54.     DOEXTRA    ShowMsg
  55.  
  56.     lea    AlertTxt2(pc),a0        ; ShowMsg ausführen
  57.     moveq    #0,d0
  58.     moveq    #20,d1
  59.     moveq    #0,d2
  60.     DOEXTRA    ShowMsg,OK
  61.  
  62.     lea    AlertTxt3(pc),a0        ; ShowMsg ausführen
  63.     moveq    #0,d0
  64.     moveq    #50,d1
  65.     moveq    #0,d2
  66.     DOEXTRA    ShowMsg,OK
  67.  
  68.     lea    AlertTxt4(pc),a0        ; ShowMsg ausführen
  69.     moveq    #0,d0
  70.     moveq    #30,d1
  71.     moveq    #0,d2
  72.     DOEXTRA    ShowMsg,OK
  73.  
  74.     lea    AlertTxt5(pc),a0        ; ShowMsg ausführen
  75.     moveq    #0,d0
  76.     moveq    #46,d1
  77.     moveq    #0,d2
  78.     DOEXTRA    ShowMsg,OK
  79.  
  80.     lea    AlertTxt6(pc),a0        ; ShowMsg ausführen
  81.     moveq    #0,d0
  82.     moveq    #30,d1
  83.     move.l    #NewColor,d2
  84.     DOEXTRA    ShowMsg,OK
  85.  
  86.     movea.l    _ExtraBase(pc),a1       ; extra.library schließen
  87.     DOEXEC    CloseLibrary
  88.     moveq    #0,d0       ; kein CLI-Fehler (Programmende)
  89.     bra.s    .exit
  90.  
  91. .error    moveq    #20,d0    ; CLI-Rückgabe FAIL (keine extra.library)
  92. .exit    rts
  93.  
  94. ExtraName    dc.b    "extra.library",0
  95. _ExtraBase    dc.l    0
  96.  
  97. AlertTxt1    SMTEXT    100,6,<linke Seite>     ; kein END-Flag, absolute
  98.     SMTEXT    444,6,<rechte Seite>    ; X-Koordinaten
  99.     SMTEXT    SMTPOS_C,16,<zentriert> ; kein END-Flag, zentriert
  100.     SMTEXT    SMTPOS_C,26,<Ende>,END  ; END-Flag, zentriert
  101.  
  102. AlertTxt2    SMTEXT    112,6,<Oder>
  103.     SMTEXT    212,6,<alles>
  104.     SMTEXT    312,6,<in>
  105.     SMTEXT    412,6,<einer>
  106.     SMTEXT    512,6,<Zeile !!>,END
  107.  
  108. AlertTxt3    SMTEXT    SMTPOS_C,6,<Oder>
  109.     SMTEXT    SMTPOS_C,16,<alles>
  110.     SMTEXT    SMTPOS_C,26,<zentriert>
  111.     SMTEXT    SMTPOS_C,36,<!!>,END
  112.  
  113. AlertTxt4    SMTEXT    SMTPOS_L,6,<linksbündig>
  114.     SMTEXT    SMTPOS_C,6,<zentriert>
  115.     SMTEXT    SMTPOS_R,6,<rechtsbündig>
  116.     SMTEXT    200,16,<absolute X-Pos 200 v.l.>,END
  117.  
  118. AlertTxt5    SMTEXTP    SMTPOS_C,6,9,11,11,STS_Plain,STM_Outline,<extra.library 4.215 - Copyright © 1998-2003 - Roland Heyder>
  119.     SMTEXTP    SMTPOS_C,18,9,15,15,STS_Plain,STM_Outline,<For registration send EUR 8,- or the changed amount in other currencies to:>
  120.     SMTEXTP    SMTPOS_C,30,9,13,13,STS_Plain,STM_Outline,<Roland Heyder - Oberstadt 44 - 38877 Benneckenstein - Germany>,END
  121.  
  122. NewColor    SMCOLOR 3,12,0,10    ; einige Farben neudefinieren
  123.     SMCOLOR 7,0,5,14
  124.     SMCOLOR 11,12,15,0
  125.     SMCOLOR 12,15,13,0
  126.     SMCOLOR 15,15,0,0,END
  127.  
  128. ; mann kann natürlich auch die beiden Macros für die Texterstellung mischen
  129.  
  130. AlertTxt6    SMTEXTP    SMTPOS_L,6,3,9,1,STS_Underline,STM_Outline,<linksbündig>
  131.     SMTEXT    SMTPOS_R,6,<rechtsbündig> ; genau wie 1.Teilsting
  132.     SMTEXTP    SMTPOS_C,6,7,9,1,STS_Bold,STM_Shadow,<zentriert>
  133.     SMTEXTP    200,16,12,9,1,STS_Italic,STM_Normal,<absolute X-Pos 200 v.l.>,END
  134.